package com.hyh.baowenlioaworking.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hyh.baowenlioaworking.commom.R;
import com.hyh.baowenlioaworking.model.Position;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @BelongsPackage: com.hyh.baowenlioaworking.mapper
 * @ClassName PositionMapper
 * @Author: hyhWTX
 * @CreateTime: 2023-07-21  14:02
 * @Description: TODO (一句话描述以下该类的功能)
 * @Version: 1.0
 */
public interface PositionMapper {
    /**
     * 查询所有信息
     *
     * @return
     */
    public List<Position> findAll();
    public IPage<Position> findAll(Page page);

    /**
     * 根据id查询数据
     * @param id
     * @return
     */
    public Position findById(@PathVariable int id);

    /**
     * 删除信息,根据id
     *
     * @param id
     * @return
     */
    public int deleteById(@PathVariable int id);

    /**
     * 修改数据，根据id修改id下的数据
     *
     * @param position
     * @return
     */
    public int updatePosition(@RequestBody Position position);

    /**
     * 添加数据
     * @param position
     * @return
     */
    public int addPosition(Position position);

    /**
     * 获得数据的总数
     * @return
     */
    public int getTotalCount();



}
